<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="index.js"></script>
<script>
    let vm = new Vue({
      data:{
        message:'hello vue.js',
        name:'zs',
        like:{
          sex:'男'
        }
      },
      watch:{
        message() {
          this.name = 'ls'
          console.log('message发生了变化1');
        },
        name() {
          console.log('123');
        }
      }
    })
    vm.message = 2
    vm.message = 3
    vm.message = 4
    vm.message = 5
</script>
</body>
</html>